<template>
  <div class="container">
    <a-list
      item-layout="vertical"
      size="large"
      :pagination="pagination"
      :data-source="listData"
      :bordered="true"
    >
      <a-list-item slot="renderItem" :key="item._id" slot-scope="item">
        <img
          slot="extra"
          width="272"
          alt="logo"
          :src="item.items[0].sch_vedio"
        />
        <a-list-item-meta>
          <span slot="description">{{
            item.banxueType +
            " | " +
            item.schType +
            " | " +
            item.items[0].xuexiaodizhi
          }}</span>
          <a slot="title" :href="item.href">{{ item.name }}</a>
          <a-avatar
            :size="64"
            slot="avatar"
            :src="`${
              item.item1.length === 0 ? '' : item.item1[0].school_icon
            }`"
          />
        </a-list-item-meta>
        {{ item.items[0].sch_introduce }}......
      </a-list-item>
    </a-list>
  </div>
</template>

<script>
export default {
  props: {
    result: {
      type: Array,    
    }
  },
  watch: { //观察数据变化， 一旦变化 就付 新值
    result(newValue) {
      this.listData = newValue
      console.log(newValue);
    }
  },
  data() {
    return {
      listData: [],
      pagination: {
        onChange: page => {
          console.log(page);
        },
        pageSize: 3,
      },
    }
  }
};
</script>


<style lang="less" scoped>
.container {
  margin: 0 auto;
  margin-top: 60px;
  width: 1200px;
}
</style>